#include "head.h"

int main() {
    int fd = open("./1.getopt.c.bak", O_RDWR | O_APPEND);
    lseek(fd, 0, SEEK_SET);
    char buff[512] = "hello world";
    printf("%s\n", buff);
    if (write(fd, buff, strlen(buff)) < 0) {
        perror("write");
        exit(1);
    }
    printf("write success \n");

    return 0;
}